-
Notifications
You must be signed in to change notification settings - Fork 100
EPPT-2588: Fire Severity Index: Add a BuildUpIndex class to IMPROVER #2253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: EPPT_2411_fire_severity_index_workflow_development
Are you sure you want to change the base?
EPPT-2588: Fire Severity Index: Add a BuildUpIndex class to IMPROVER #2253
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## EPPT_2411_fire_severity_index_workflow_development #2253 +/- ##
=====================================================================================
Coverage ? 95.25%
=====================================================================================
Files ? 152
Lines ? 15369
Branches ? 0
=====================================================================================
Hits ? 14640
Misses ? 729
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2a9f48c to
f7fc7a7
Compare
…ding tests for input validation
Anzerkhan27
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation is consistent with the existing fire weather plugins, the structure aligns with the FireWeatherIndexBase. The tests provide good coverage
MoseleyS
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've picked up on a few things to think about. The main thing is that I don't think you should include tests of base-class functions in the concrete-class tests.
| def input_cubes( | ||
| dmc_val: float = 10.0, | ||
| dc_val: float = 15.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could use pytest fixtures to simplify these tests:
| def input_cubes( | |
| dmc_val: float = 10.0, | |
| dc_val: float = 15.0, | |
| @pytest.fixture | |
| def input_cubes( | |
| dmc_val: float, | |
| dc_val: float, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of using the fixtures. I think it's easier to read as a called function, and means you don't have to pass it as a parameter to each test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I quite like fixtures, but they don't offer much benefit here, so I won't push it.
What I did spot is that the default values for input_cubes() are never used, which was what put fixtures in my mind as they do play nicely with pytest.mark.parametrize.
EPPT-2588
In order to calculate the daily Fire Severity Index, we require a Buildup Index calculation. This class, and associated tests, partially reproduce the Canadian Forest Fire Weather Index from van Wagner and Pickett's 1985 FORTRAN implementation
Testing: